#基于alpine镜像
FROM registry.jxit.net.cn:5000/alpine


#替换软件源地址

RUN sed -i 's@dl-cdn.alpinelinux.org@mirrors.aliyun.com@g' /etc/apk/repositories
#安装jdk等运行环境
RUN apk update && apk add openjdk8-jre perl bash mariadb-client
#安装tomcat8
RUN wget http://stu.jxit.net.cn:88/k8s/tomcat8-cgi.tar.gz -O /opt/tomcat8-cgi.tar.gz
#解压
RUN tar -zxf /opt/tomcat8-cgi.tar.gz -C /opt/
#拷贝war包到tomcat8目录
COPY target/virstu.war /opt/tomcat8/webapps/ROOT.war

#拷贝启动脚本到根目录
COPY init.sh /

#告诉镜像开机执行这个脚本
ENTRYPOINT ["bash" , "-x", "/init.sh"]
